package com.szrt.java.day20170113.demo06;


import org.junit.Test;

public class SwimCarTest {

	@Test
	public void CarTest() {
		CommonCar car = new CommonCar();
		
		SwimCar swimCar = new SwimCar(car);
		
		swimCar.drive();
	}

	@Test
	public void flyCarTest() {
		CommonCar car = new CommonCar();
		
		SwimCar swimCar = new SwimCar(car);
		
		FlyCar flyCar = new FlyCar();
		flyCar.setCar(swimCar);
		
		flyCar.drive();
	}
	
}
